You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > TOpenCLMtxVec Class > TOpenCLMtxVec Methods > SinCos Method > TOpenCLMtxVec.SinCos Method ([In] TOpenCLMtxVec, [In] TOpenCLMtxVec)
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
TOpenCLMtxVec.SinCos Method ([In] TOpenCLMtxVec, [In] TOpenCLMtxVec)

Sine and cosine.

Syntax
C#
Visual Basic
public void SinCos([In] TOpenCLMtxVec SinX, [In] TOpenCLMtxVec CosX);

Calculates the sine and cosine for all calling object elements and stores the sines to SinX and cosines to CosX. Size and TOpenCLBase.ComplexComplexproperty of SinX and CosX are adjusted automatically. 

Note Use this method if you require both sine and cosine.

using Dew.Math; using Dew.Math.Units; namespace Dew.Examples() { void Example() { TOpenCLVector a,s,v; MtxVec.CreateIt(out a, out s, out c); try { a.CopyFromArray( new double[] {0,Math387.PIDIV2,Math387.PI); a.SinCos(s,c); // s=[0,1,0], c =[1,0,-1] } finally { MtxVec.FreeIt(ref a, ref s, ref c); } } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!